var app = getApp()
Page({
  data: {
    arraydetail: [],
    msg: '',
    author: 'Lotus'
  },
  getlist: function () {
    var that = this;
    var service = 'Balance.getBalanceAndRecords';
    console.log("openId=" + app.globalData.openId);
    wx.request({
      method: 'POST',
      url: app.globalData.APIURL,
      data: { service: service, openId: app.globalData.openId },
      header: { 'Content-Type': 'application/x-www-form-urlencoded' },
      success: function (res) {
        if (!res.data.data.code) {
          var arraydetail = res.data.data.info.records;
          that.setData({ arraydetail: arraydetail })
        } else {
          that.setData({ msg: res.data.data.message })
        }

      }
    })
  },
  onLoad: function (options) {
    var that = this;
    if (options.fromInviteCode) {
      app.globalData.fromInviteCode = options.fromInviteCode;
    }
    app.appstart();
    wx.getSystemInfo({
      success: function (res) {
        that.setData({
          winWidth: res.windowWidth,
          winHeight: res.windowHeight,
          scrollHeight: res.windowHeight
        });
      }
    });
    that.getlist();
  }

})